package com.howlaisi.devops.commit

def getCommitId() {
    return sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim()
}

def getCommitUser() {
    return sh(script: 'git log --pretty=format:%an', returnStdout: true).trim()
}

def getCommitTime() {
    return sh(script: 'git log --pretty=format:%ai', returnStdout: true).trim()
}

def getCommitInfo() {
    return sh(script: 'git log --pretty=format:%s',  returnStdout: true).trim()
}